package main

import (
	"fmt"
	"html/template"
)

func main(){
	fmt.Println("example of must in template")
	t1:=template.New("first")
	template.Must(t1.Parse(" some static text /* and a comment */"))
	fmt.Println("The first one parsed OK.")
	
	template.Must(template.New("second").Parse("some static text {{ .Name }}"))
	fmt.Println("The second one parsed OK.")
	
	fmt.Println("The next one ought to fail")
	tErr:=template.New("check parse error with Must")
	template.Must(tErr.Parse(" some static text {{.Name}"))
}